import React from 'react';
import {CheckCircleFilled} from '@ant-design/icons';
import {Steps, Button} from 'antd';
import {withRouter} from 'react-router-dom';

const {Step} = Steps;

import './styles.less';

class Success extends React.Component {
    constructor(props) {
        super(props);
    }

    toPrevious = () => {
        const {history} = this.props;
        history.goBack();
    };

    render() {
        return (
            <div className="success-page-wrapper">
                <div className="success-page-container">
                    <CheckCircleFilled style={{color: '#52c41a', fontSize: 72, marginBottom: 24}}/>
                    <p style={{fontSize: 24}}>提交成功</p>
                    <div className="current-step">
                        <div style={{fontSize: 16, marginBottom: 24, fontWeight: 700}}>提交进度</div>
                        <Steps current={1}>
                            <Step title="已提交" description="This is a description." />
                            <Step title="待审核" description="This is a description." />
                        </Steps>
                    </div>
                    <div className="success-page-btns">
                        <Button type="primary" onClick={this.toPrevious}>返回上一级</Button>
                        <Button>查看项目</Button>
                    </div>
                </div>
            </div>
        )
    }
}

export default withRouter(Success);